<!-- INCLUDE cms/output/header_body.html -->

<!-- INCLUDE cms/menu/output/option_bar_body.html -->

<section class="full-content">
	<article>
		<form action="cms.php?p=menu&act=delete&id={ID}" method="post" id="form-delete-menu">
			<div class="head">Are you sure want to delete this menu item?</div>
			<div class="form-box">
				<div class="row">
					<div class="single">
						<input type="submit" name="submit" value="Confirm" />
					</div>
				</div>
			</div>
		</form>
	</article>
	<article>
		<a class="close-window hover">Close Window</a>
	</article>
</section>

<script type="text/javascript">
$('.close-window').click(function(){
	$.unblockUI();	
});

$("#form-delete-menu").submit(function(event){
	event.preventDefault();

	var $form	= $(this),
	userName	= '{MENU_TITLE}' ,
	url			= $form.attr('action');
	
	var posting = $.post(url, {submit:true});
	
	posting.done(function(data){
		var content = $(data).find('#content');
		$('#result').empty().append(content);
		$.unblockUI();	
		$.growlUI('Succes!', 'User ' + userName + ' has been succesfully deleted!');
		$('#full').load('cms.php?p=menu&ajax=true');
	});
});
	
</script>

<!-- INCLUDE cms/output/footer_body.html -->